//
//  RYCHTTPListModel.h
//  Cashier
//
//  Created by hemingway payegis on 13-2-1.
//  Copyright (c) 2013年 payegis. All rights reserved.
//

#import "RYCHTTPRequestModel.h"

@class RYCHTTPListModel;
@protocol RYCHTTPListModelPagingPolicy <NSObject>
- (NSDictionary*)pagingParamsForSendRequest:(RYCHTTPListModel*)listModel;
- (void)didModelFinished:(RYCHTTPListModel*)listModel;
- (void)reset:(RYCHTTPListModel*)listMode;
- (BOOL)hasNextPage:(RYCHTTPListModel*)listMode;
@end

@interface RYCHTTPListModel : RYCHTTPRequestModel

@property (nonatomic, readonly, retain) NSMutableArray* lastResponseList;
@property (nonatomic, readonly, retain) NSMutableArray* allResponseList;
@property (nonatomic, readonly) BOOL hasNextPage;
@property (nonatomic, retain) id<RYCHTTPListModelPagingPolicy> pagingPolicy;

- (BOOL)handleResponseJSON:(id)aJSON;
- (id)extractJSONResponse:(id)aJSON;

- (NSDictionary*)pagingParams;

- (void)sendRequest:(RYCHTTPRequestModelOperation)operation;
//子类重载
- (id)parseContent:(id)content;
@end
